package smu.KYBank;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class KYBmain extends Activity implements OnClickListener {
	
	String login_id;
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.kyb);
        
        Intent intent = getIntent();
		login_id = intent.getStringExtra("login_id");
        
    }
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent intent;
		switch (v.getId()) {
		case R.id.deposit: 
			intent = new Intent(KYBmain.this, KYBdeposit.class);
			intent.putExtra("login_id", "" + login_id);
			startActivity(intent);
			finish();			
			break;
		case R.id.withdraw:
			intent = new Intent(KYBmain.this, KYBwithdraw.class);
			startActivity(intent);
			finish();
			break;
		case R.id.transfer:
			intent = new Intent(KYBmain.this, KYBtransfer.class);
			startActivity(intent);
			finish();
			break;
		case R.id.create:
			intent = new Intent(KYBmain.this, KYBcreate.class);
			startActivity(intent);
			finish();
			break;
		case R.id.inquire:
			intent = new Intent(KYBmain.this, KYBinquire.class);
			startActivity(intent);
			finish();
			break;
		case R.id.edit:
			intent = new Intent(KYBmain.this, KYBedit.class);
			startActivity(intent);
			finish();
			break;
		case R.id.delete:
			intent = new Intent(KYBmain.this, KYBdelete.class);
			startActivity(intent);
			finish();
			break;
		case R.id.logout:
			intent = new Intent(KYBmain.this, KYB.class);
			startActivity(intent);
			finish();
			break;
		case R.id.quit:
			finish();
			break;
		default:
			break;
		}
	}
}
